package com.cy.es.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
/*
indexName指定创建的索引名
shards和replicas属性可以不指定在es服务器上自动创建这个索引
 */
@Document(indexName = "students")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Student {
    @Id //使用学生的学号，作为索引id(_id)
    private Long id;
    private String name;
    private Character gender;
    private String birthDate;
}
